home *** CD-ROM | disk | FTP | other *** search
/ Liberation Day / Liberation Day.bin / AcroRd32.exe / PSPROCSET / 9 < prev   
Text File  |  1997-04-23  |  3KB  |  137 lines

  1. %%BeginFile: pdfimg1c.prc
  2. %%Copyright: Copyright 1987-1993 Adobe Systems Incorporated. All Rights Reserved.
  3. PDF /PDFImage get begin
  4. Level2? not StartLoad {
  5. /DeviceRGB [ 3
  6. {
  7. Width Height BitsPerComponent ImageMatrix ImageFilter 3
  8. ColorImage
  9. } bind
  10. ] InstallImage
  11. /DeviceCMYK [ 4
  12. {
  13. Width Height BitsPerComponent ImageMatrix ImageFilter 4
  14. ColorImage
  15. } bind
  16. ] InstallImage
  17. /ColorImage? /colorimage where { pop true } { false } ifelse def
  18. ColorImage? StartLoad {
  19. /ColorImage { false exch colorimage } bd
  20. } EndLoad
  21. ColorImage? not StartLoad {
  22. /SetupColorImage {
  23. /CIConv 255 2 BitsPerComponent exp 1 sub div pv
  24. /CIMask 0 not BitsPerComponent bitshift not pv
  25. /CIBSelect BitsPerComponent 1 sub not 7 and pv
  26. /CIBufferExp CIWidth string pv
  27. } bd
  28. /rgbtogray {
  29. 0.11 mul exch 0.59 mul add exch 0.3 mul add round cvi
  30. } bd
  31. /cmyktogray {
  32. exch 0.11 mul add exch 0.59 mul add exch 0.3 mul add round cvi
  33. dup 255 gt { pop 255 } if
  34. 255 exch sub
  35. } bd
  36. /FastRGB {
  37. CIDataProc dup
  38. 0 3 2 index length 3 sub
  39. {
  40. dup 3 idiv
  41. 2 index 2 index get
  42. 3 index 3 index 1 add get
  43. 4 index 4 index 2 add get
  44. rgbtogray
  45. 3 -1 roll pop put dup
  46. } for
  47. 0 exch length 3 idiv getinterval
  48. } bd
  49. /FastCMYK {
  50. CIDataProc dup
  51. 0 4 2 index length 4 sub {
  52. dup 4 idiv
  53. 2 index 2 index get
  54. 3 index 3 index 1 add get
  55. 4 index 4 index 2 add get
  56. 5 index 5 index 3 add get
  57. cmyktogray
  58. 3 -1 roll pop put dup
  59. } for
  60. 0 exch length 4 idiv getinterval
  61. } bd
  62. /SlowRGB {
  63. CIDataProc pop
  64. 0 1 CIWidth 1 sub {
  65. 0 1 2 {
  66. 1 index 3 mul add CIBPC mul
  67. CIBSelect 1 index 1 index and sub
  68. exch 8 idiv
  69. CIBuffer exch get
  70. exch neg bitshift CIMask and CIConv mul exch
  71. } for
  72. 4 1 roll rgbtogray
  73. CIBufferExp 3 1 roll put
  74. } for
  75. CIBufferExp
  76. } bd
  77. /SlowCMYK {
  78. CIDataProc pop
  79. 0 1 CIWidth 1 sub {
  80. 0 1 3 {
  81. 1 index 4 mul add CIBPC mul
  82. CIBSelect 1 index 1 index and sub
  83. exch 8 idiv
  84. CIBuffer exch get
  85. exch neg bitshift CIMask and CIConv mul exch
  86. } for
  87. 5 1 roll cmyktogray
  88. CIBufferExp 3 1 roll put
  89. } for
  90. CIBufferExp
  91. } bd
  92. /ColorImage {
  93. /CINumComps exch pv
  94. /CIDataProc exch pv
  95. /CIIMatrix exch pv
  96. /CIBPC exch pv
  97. /CIHeight exch pv
  98. /CIWidth exch pv
  99. CIWidth CIHeight 8 CIIMatrix
  100. CINumComps 1 eq { /CIDataProc } {
  101. CINumComps 3 eq {
  102. CIBPC 8 eq { /FastRGB
  103. } { SetupColorImage /SlowRGB } ifelse
  104. } {
  105. CIBPC 8 eq { /FastCMYK
  106. } { SetupColorImage /SlowCMYK } ifelse
  107. } ifelse
  108. } ifelse
  109. load image
  110. } bd
  111. } EndLoad
  112. } EndLoad
  113. _ColorSep5044? {
  114. /colorimage where {
  115. pop
  116. /paintimage {
  117. {currentfile cyanstr readhexstring pop}
  118. {currentfile magentastr readhexstring pop}
  119. {currentfile yellowstr readhexstring pop}
  120. {currentfile blackstr readhexstring pop
  121. currentfile graystr readhexstring pop pop}
  122. true 4 colorimage
  123. } bd
  124. }{
  125. /paintimage {
  126. {currentfile cyanstr readhexstring pop pop
  127. currentfile magentastr readhexstring pop pop
  128. currentfile yellowstr readhexstring pop pop
  129. currentfile blackstr readhexstring pop pop
  130. currentfile graystr readhexstring pop}
  131. image
  132. } bd
  133. } ifelse
  134. } if
  135. end
  136. %%EndFile
  137.